home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-01 | 3.4 KB | 144 lines | [TEXT/CWIE] |
-
- #undef EXACT_R // ••• must be revised
- #define EXACT_R 0
-
- #undef INFO_ILLEGALS // ••• must be revised
- #define INFO_ILLEGALS 0
-
- #undef INFO_WEIRD // ••• must be revised
- #define INFO_WEIRD 0
-
- #undef INFO_IRPT // ••• must be revised
- #define INFO_IRPT 0
-
- #undef INFO_NMI // ••• must be revised
- #define INFO_NMI 0
-
- #undef INFO_MISC // ••• must be revised
- #define INFO_MISC 0
-
- #undef CMD_PROFILE // ••• must be revised
- #define CMD_PROFILE 0
-
- #undef PC_PROFILE // ••• must be revised
- #define PC_PROFILE 0
-
-
- // code generating macros for Z80() (68k assembly version)
- // -----------------------------------------------------
-
- #define m_next jmp (loop)
-
-
- // ----- Macros which call Z80_Info(cc,ip) or do nothing ------------------------------------
- // depending on flags defined in z80.options
-
- #if INFO_IRPT
- #define do_info_irpt }; Z80_Info_Irpt (cc,ip); asm {
- #else
- #define do_info_irpt
- #endif
-
- #if INFO_NMI
- #define do_info_nmi }; Z80_Info_NMI (cc,ip); asm {
- #else
- #define do_info_nmi
- #endif
-
- #if INFO_ILLEGALS
- #define do_info_illegals1 }; Z80_Info(cc,ip-1); asm {
- #define do_info_illegals2 }; Z80_Info(cc,ip-2); asm {
- #define do_info_illegals3 }; Z80_Info(cc,ip-3); asm {
- #define do_info_illegals4 }; Z80_Info(cc,ip-4); asm {
- #else
- #define do_info_illegals1
- #define do_info_illegals2
- #define do_info_illegals3
- #define do_info_illegals4
- #endif
-
- #if INFO_MISC
- #define do_info_rst0 }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_rst8 }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_rst16 }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_rst24 }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_rst32 }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_rst40 }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_rst48 }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_rst56 }; Z80_Info ( cc,ip-1 ); asm {
- #else
- #define do_info_rst0
- #define do_info_rst8
- #define do_info_rst16
- #define do_info_rst24
- #define do_info_rst32
- #define do_info_rst40
- #define do_info_rst48
- #define do_info_rst56
- #endif
-
- #if INFO_MISC
- #define do_info_di }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_ei }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_halt }; Z80_Info ( cc,ip-1 ); asm {
- #define do_info_r }; Z80_Info ( cc,ip-2 ); asm {
- #define do_info_i }; Z80_Info ( cc,ip-2 ); asm {
- #define do_info_im }; Z80_Info ( cc,ip-2 ); asm {
- #define do_info_retn }; Z80_Info ( cc,ip-2 ); asm {
- #define do_info_reti }; Z80_Info ( cc,ip-2 ); asm {
- #define do_info_daa }; Z80_Info ( cc,ip-1 ); asm {
- #else
- #define do_info_di
- #define do_info_ei
- #define do_info_halt
- #define do_info_r
- #define do_info_i
- #define do_info_im
- #define do_info_retn
- #define do_info_reti
- #define do_info_daa
- #endif
-
-
- // ----- Exact register R handling: R is kept in mc68 register
- #if EXACT_R
-
- #define define_r register short r;
-
- #define load_r move.b RR,r ;\
- add.w r,r ;\
- lsr.b #1,r
-
- #define store_r add.b r,r ;\
- lsr.w #1,r ;\
- move.b r,RR
-
- #define ld_r_a move.w a,r ;\
- add.w r,r ;\
- lsr.b #1,r
-
- #define ld_a_r add.b r,r ;\
- lsr.w #1,r ;\
- move.b r,a // and set flags Z and S !!!
-
-
- // ----- Use register R for random generation only: Bit 7 is kept in RR
- #else
-
- #define define_r // nop
- #define load_r // nop
- #define store_r // nop
-
- #define ld_r_a move.b a,RR
-
- #define ld_a_r move.b RR,a ;\
- and.b #0x80,a ;\
- subq.l #2,a7 ;\
- _Random ;\
- move.w (a7)+,d0 ;\
- and.b #0x7f,d0 ;\
- or.b d0,a // and set flags Z and S !!!
-
- #endif
-
-